package com.gigrt.midend.marketing.impl.domain.campaign.event.publish;

import com.gigrt.midend.marketing.impl.infrastructure.eventbus.IDomainEvent;
import com.gigrt.midend.marketing.impl.infrastructure.eventbus.IDomainEventBus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <P>LeaveEventPublisher</P>
 *
 * @author zhong.fuhua@iwhalecloud.com
 * @date 2020/4/15 17:13
 * @since
 */
@Component
public class LeaveEventPublisher {

  @Autowired
  private IDomainEventBus domainEventBus;

  public void publish(IDomainEvent domainEvent) {
    // todo some operations before publishing
    domainEventBus.publish(domainEvent);
  }
}
